<!DOCTYPE html>
<html lang="zh-CN">
<head>
<title>个人金豆</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="format-detection" content="telephone=no"/>
<meta name="format-detection" content="email=no"/>
<meta name="format-detection" content="address=no"/>
<link href="__PUBLIC__/css/base.css" rel="stylesheet"/>
</head>
<body class="huibg">
<!---  头部开始  -->
<div class="top clearfix">
	<div class="icon_left"></div>
	<div class="icon_right"></div>
</div>
<!---  头部结束  -->
<div class="grjd cssss">
	<table class="tab_03">
		<tr>
			<th><img src="{$user.headimg}" /></th>
			<td>
				<p class="name">{$user.name}</p>
				<p>金 豆：<span>{$user.points}</span></p>
			</td>
			<td>
				<p class="bt0"><a class="buyJd" href="__URL__/buy_jd">购买金豆</a></p>
				<p><a class="jdRule" href="__URL__/rule">金豆规则</a></p>
			</td>
		</tr>
	</table>
	<table class="tab_04">
		<tr>
			<td colspan="2" class="title">金豆明细</td>
		</tr>
	</table>
	<a class="more">查看更多</a>
</div>
</body>
<script src="__PUBLIC__/js/jquery.js"></script>
<script src="__PUBLIC__/js/comm.js"></script>
<script>
var pageSize=5;//每页多少条
var pageIndex=0;//初始化第0页
var price;
var sta;
function getlist(){
	var new_element;
	$.post('__URL__/grjd_page',{
		pageSize:pageSize,
		pageIndex:pageIndex
	},function(e){
		if(null == e){
			$(".more").text('没有数据');
			return;
		}
		if(e.length < pageSize){
			$(".more").text('已经是最后一页');
		}
		$.each(e,function(k,v){
			if(v.add == 1){
				new_element='<tr>'+
					'<td>'+
						'<p class="hl1">'+v.name+'</p>'+
						'<p>'+v.addtime+'</p>'+
					'</td>'+
					'<th>+'+v.points+'</th>'+
				'</tr>';
			}else if(v.add == 2){
				new_element='<tr>'+
					'<td>'+
						'<p class="hl1">'+v.name+'</p>'+
						'<p>'+v.addtime+'</p>'+
					'</td>'+
					'<th class="hl2">-'+v.points+'</th>'+
				'</tr>';
			}
			$(".tab_04").append(new_element);
		});
		pageIndex++;
	});
}
getlist();
$(".more").on("click",function(){
	getlist();
});
</script>
</html>